#include "suppliervieweditdialog.h"

void SupplierViewEditDialog::setSupplier(SupplierModel *supplier)
{
    this->nameEdit->setText(supplier->getName());
    this->countryEdit->setText(supplier->getCountry());
    this->contactEdit->setText(supplier->getContactNumber());
    this->supplier = supplier;
}


SupplierViewEditDialog::SupplierViewEditDialog(QWidget *parent, SupplierModel *supplier):
    SupplierViewAddDialog(parent)
{
    this->setWindowTitle("Edit Supplier");
    this->headerLabel->setText("Edit a Supplier's Information");
    this->subHeaderLabel->setText("Update your Supplier's information as necessary.");
    this->setSupplier(supplier);
}
